<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>文档标题</title>
    <script>
        const num = Number(prompt("请输入一个三位数"));
        const a = parseInt(num /100 + "");
        const b = parseInt(num % 100 / 10 + "");
        const c = num % 10;
        alert(a + b+ c);
    </script>
</head>
<body>
<h1>我的第一个HTML页面</h1>
<p>我的第一个段落。</p>
</body>
</html>
